<!doctype html>
<html lang="en">
<head>
    <title>Tooltip - Callout Animation</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="%description%" />
    <meta name="keywords" content="" />
    <meta name="author" content="ComponentOne" />
    
    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
    
    <link href="../../themes/wijmo/jquery.wijmo.wijtooltip.css" rel="stylesheet" type="text/css" />
    <script src="../../external/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="../../external/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
    <script src="../../external/jquery.mousewheel.min.js" type="text/javascript"></script>
    <script src="../../external/jquery.bgiframe-2.1.3-pre.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijutil.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijtooltip.js" type="text/javascript"></script>
    <script id="scriptInit" type="text/javascript">
        $(document).ready(function () {
            $("#boxes").wijtooltip({
                showCallOut: true,
                closeBehavior: "none",
                position: { my: "center bottom", at: "center top", offset: "50 0" }
            });
            //the first show is to create the tooltip element.
            $("#boxes").wijtooltip("show");
            var tooltip = $("#boxes").wijtooltip("widget");
            tooltip.width(500);
            tooltip.height(50);
            $("#boxes").wijtooltip("show");
            var colors = ["red", "blue", "yellow", "black", "green"];
            $("#boxes>div").each(function (i) {
                $(this).css("background-color", colors[i]);
                $(this).bind("click", function () {
                    var value = 50 + 100 * i;
                    $("#boxes").wijtooltip("option", "position", { offset: value + " 0" });
                });
            });

        });
            
    </script>
    <style type="text/css">
        .boxes
        {
            width: 500px;
            height: 50px;
            margin-top: 100px;
        }
        .boxes div
        {
            width: 100px;
            height: 50px;
            float: left;
        }
    </style>
</head>
<body class="demo-single">
    <div class="container">
        <div class="header">
            <h2>
                Callout Animation</h2>
        </div>
        <div class="main demo">
            <!-- Begin demo markup -->
            <div class="boxes" id="boxes">
                <div>
                </div>
                <div>
                </div>
                <div>
                </div>
                <div>
                </div>
                <div>
                </div>
            </div>
            <!-- End demo markup -->
            <div class="demo-options">
                <!-- Begin options markup -->
                <!-- End options markup -->
            </div>
        </div>
        <div class="footer demo-description">
<p>This sample shows how the <b>position</b> option can be used to animate the tooltip.</p>
<p>Click one of the colored blocks to move the tooltip.</p>
        </div>
    </div>
</body>
</html>
